package com.example.tree;

public class Offer27_MirrorTree {

    public static void main(String[] args) {

    }

    public TreeNode mirrorTree(TreeNode root) {

        if (root == null)
            return root;
        TreeNode tmp = root.left;
        root.left = root.right;
        root.right = tmp;

      mirrorTree(root.left);

      mirrorTree(root.right);
        return root;
    }
}
